package com.ruitu.router_module.bean.order;

import com.ruitu.router_module.bean.cart.OmsCartItemListBean;
import com.ruitu.router_module.bean.user.Address;

import java.io.Serializable;
import java.util.List;

public class ConfirmOrder implements Serializable {

    /**
     * cartPromotionItemList : [{"id":22,"productId":26,"productSkuId":90,"memberId":80,"quantity":2,"canUseIntegral":0,"price":4088,"sp1":null,"sp2":null,"sp3":null,"productPic":"http://macro-oss.oss-cn-shenzhen.aliyuncs.com/mall/images/20180607/5ac1bf58Ndefaac16.jpg","productName":"华为 HUAWEI P20 ","productSubTitle":"AI智慧全面屏 6GB +64GB 亮黑色 全网通版 移动联通电信4G手机 双卡双待手机 双卡双待","productSkuCode":null,"memberNickname":null,"createDate":"2019-12-23 13:54:00","modifyDate":null,"deleteStatus":0,"productCategoryId":19,"productBrand":"华为","productSn":"6946605","productAttr":null,"promotionMessage":"单品促销","reduceAmount":200,"realStock":88,"integration":3788,"growth":3788}]
     * memberReceiveAddressList : []
     * couponHistoryDetailList : []
     * integrationConsumeSetting : {"id":1,"deductionPerAmount":100,"maxPercentPerOrder":50,"useUnit":100,"couponStatus":1}
     * memberIntegration : null
     * calcAmount : {"totalAmount":8176,"freightAmount":0,"promotionAmount":0,"payAmount":8176}
     */


    private CalcAmountBean calcAmount;
    private List<OmsCartItemListBean> cartPromotionItemList;
    private Address memberReceiveAddress;
    private ISetting integrationConsumeSetting;

    public ISetting getIntegrationConsumeSetting() {
        return integrationConsumeSetting;
    }

    public void setIntegrationConsumeSetting(ISetting integrationConsumeSetting) {
        this.integrationConsumeSetting = integrationConsumeSetting;
    }

    public CalcAmountBean getCalcAmount() {
        return calcAmount;
    }

    public void setCalcAmount(CalcAmountBean calcAmount) {
        this.calcAmount = calcAmount;
    }

    public List<OmsCartItemListBean> getCartPromotionItemList() {
        return cartPromotionItemList;
    }

    public void setCartPromotionItemList(List<OmsCartItemListBean> cartPromotionItemList) {
        this.cartPromotionItemList = cartPromotionItemList;
    }

    public Address getMemberReceiveAddress() {
        return memberReceiveAddress;
    }

    public void setMemberReceiveAddressList(Address memberReceiveAddressList) {
        this.memberReceiveAddress = memberReceiveAddressList;
    }

    public static class CalcAmountBean implements Serializable{
        /**
         * totalAmount : 8176.0
         * freightAmount : 0
         * promotionAmount : 0
         * payAmount : 8176.0
         */

        private String totalAmount;
        private int freightAmount;
        private int promotionAmount;
        private double payAmount;

        public String getTotalAmount() {
            return totalAmount;
        }

        public void setTotalAmount(String totalAmount) {
            this.totalAmount = totalAmount;
        }

        public int getFreightAmount() {
            return freightAmount;
        }

        public void setFreightAmount(int freightAmount) {
            this.freightAmount = freightAmount;
        }

        public int getPromotionAmount() {
            return promotionAmount;
        }

        public void setPromotionAmount(int promotionAmount) {
            this.promotionAmount = promotionAmount;
        }

        public double getPayAmount() {
            return payAmount;
        }

        public void setPayAmount(double payAmount) {
            this.payAmount = payAmount;
        }
    }

    @Override
    public String toString() {
        return "ConfirmOrder{" +
                ", calcAmount=" + calcAmount +
                ", cartPromotionItemList=" + cartPromotionItemList +
                ", memberReceiveAddress=" + memberReceiveAddress +
                '}';
    }

    public class ISetting implements Serializable {

        /**
         * id : 1
         * deductionPerAmount : 100
         * maxPercentPerOrder : 50
         * useUnit : 100
         * couponStatus : 1
         */

        private int id;
        private int deductionPerAmount;
        private int maxPercentPerOrder;
        private int useUnit;
        private int couponStatus;

        public int getId() {
            return id;
        }

        public void setId(int id) {
            this.id = id;
        }

        public int getDeductionPerAmount() {
            return deductionPerAmount;
        }

        public void setDeductionPerAmount(int deductionPerAmount) {
            this.deductionPerAmount = deductionPerAmount;
        }

        public int getMaxPercentPerOrder() {
            return maxPercentPerOrder;
        }

        public void setMaxPercentPerOrder(int maxPercentPerOrder) {
            this.maxPercentPerOrder = maxPercentPerOrder;
        }

        public int getUseUnit() {
            return useUnit;
        }

        public void setUseUnit(int useUnit) {
            this.useUnit = useUnit;
        }

        public int getCouponStatus() {
            return couponStatus;
        }

        public void setCouponStatus(int couponStatus) {
            this.couponStatus = couponStatus;
        }
    }

}
